package oop.ex4.search;

/**
 * This interface contains the method for a search. The type parameter B stands
 * for concrete type of SearchBoard An implementation must work with ANY class
 * that implements the SearchBoard interface (including the supplied example),
 * and not only with implementations of Crossword interface).
 * 
 * @author Dima
 */
public interface DepthFirstSearch<B extends SearchBoard<M>,M extends SearchMove> {
	
	///////////////////////////////////////////////////////
	/////////////////////Public Method/////////////////////
	///////////////////////////////////////////////////////
	
	/**
	 * Performs Depth First Depth Limited search, up to give depth, and using at most
	 * the given time (in ms), starting from the given SearchBoard. <br>
	 * This method assumes no loops.
	 * 
	 * @param board The board where you start the search.
	 * @param maxDepth Maximal depth of your search. <br>
	 * Depth 0 means that you check only the given SearchBoard. <br>
	 * Depth 1 only SearchBoard and it's children...
	 * @param timeOut Time in milliseconds to perform the search.
	 * 
	 * @return SearchBoard with highest non-negative quality found within the 
	 * given time and depth. If all observed quality values are negative, returns null.
	 */
	public B search(B board, int maxDepth, long timeOut);
}
